package com.ss.android.article.base.app;

import com.bytedance.common.utility.Logger;
import com.bytedance.frameworks.baselib.network.dispatcher.AbsRequest;

import java.io.File;
import java.io.FileNotFoundException;

final class LoadHijackJsThread extends AbsRequest {
    private final JsConfigHelper.c b;
    private final String a;

    LoadHijackJsThread(JsConfigHelper.c arg1, String arg2, Priority arg3, String arg4) {
        super(arg2, arg3);
        this.b = arg1;
        this.a = arg4;
    }

    public final void run() {
        String v2;
        int v0_1;
        File v3;
        super.run();
        try {
            if (Logger.debug()) {
                Logger.d("hijack", "LoadHijackJsThread start");
            }

            v3 = new File(this.a);
            if (v3.exists()) {
                v0_1 = 1;
            } else {
                v0_1 = 0;
            }
            if (v0_1 != 0 && (v3.isFile())) {
                v2 = new String(android.support.design.a.a(android.support.design.a.a(v3)));
                synchronized (this) {
                    this.b.p = v2;
                    this.b.q = this.b.savedZipJsMd5;
                    this.b.r.getAndSet(false);
                    return;
                }
            }

            throw new FileNotFoundException(v3.getAbsolutePath());
        } catch (Throwable v0) {
            v0.printStackTrace();
        }
    }
}

